home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / DEPOSITO / sb_bust.swf / scripts / __Packages / Enemy3Obj.as < prev    next >
Text File  |  2006-07-26  |  2KB  |  71 lines

  1. class Enemy3Obj extends Enemy1Obj
  2. {
  3.    function Enemy3Obj(l_RefMov)
  4.    {
  5.       super(l_RefMov);
  6.       this.ComboNow = new Array(35);
  7.       this.Combos = new Array();
  8.       this.Combos.push(["PunchR",["Wait",20,20]]);
  9.       this.Combos.push(["PunchL",["Wait",20,20]]);
  10.       this.Combos.push(["PunchR",["Wait",20,20]]);
  11.       this.Combos.push(["PunchL",["Wait",20,20]]);
  12.       this.Combos.push(["SA",["Wait",25,25]]);
  13.       this.MaxHealth = 100;
  14.       this.Health = 100;
  15.       this.ChanceToParry = 90;
  16.       this.MaxNbParry = 2;
  17.       this.PunchRDammage = 5;
  18.       this.PunchLDammage = 5;
  19.       this.SADammage = 20;
  20.       this.BounceDammage = 20;
  21.    }
  22.    function StartBounce()
  23.    {
  24.       if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
  25.       {
  26.          this.State = "BouncePt1";
  27.       }
  28.    }
  29.    function BouncePt1()
  30.    {
  31.       if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
  32.       {
  33.          this.CheckHit();
  34.          this.State = "BouncePt2";
  35.       }
  36.    }
  37.    function BouncePt2()
  38.    {
  39.       if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
  40.       {
  41.          this.CheckHit();
  42.          this.State = "BouncePt3";
  43.       }
  44.    }
  45.    function BouncePt3()
  46.    {
  47.       if(this.RefMov.State._currentframe >= this.RefMov.State._totalframes)
  48.       {
  49.          this.ReturnIdle();
  50.       }
  51.    }
  52.    function CheckHit()
  53.    {
  54.       if(_global.C.Player.CanBeHit or this.State == "BouncePt2" and (_global.C.Player.State == "ParryL" or _global.C.Player.State == "EndParryL" or _global.C.Player.State == "StartParryL"))
  55.       {
  56.          _global.C.Player.SetGetHit(this[this.ActionNow + "Dammage"]);
  57.       }
  58.       else if((_global.C.Player.ActionNow == "ParryR" or _global.C.Player.ActionNow == "ParryL") and _global.C.Player.AvoidAttack == "")
  59.       {
  60.          _global.C.Player.AvoidAttack = this.ActionNow;
  61.          _global.C.Player.PtSA += _global.C.Player.NbPtSAWin;
  62.          _global.C.Player.HaveParry = true;
  63.          if(_global.C.Player.PtSA > 100)
  64.          {
  65.             _global.C.Player.PtSA = 100;
  66.          }
  67.          _global.C._parent.Interface.PlayerSA.gotoAndStop(_global.C.Player.PtSA + 1);
  68.       }
  69.    }
  70. }
  71.